package com.shanzmoo.db.picture.service.impl;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shanzmoo.db.picture.entity.ProductInfoPictureEntity;
import com.shanzmoo.db.picture.mapper.ProductInfoPictureMapper;
import com.shanzmoo.db.picture.service.IProductInfoPictureService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 商品详情图片 服务实现类
 * </p>
 *
 * @author Xueqz
 * @since 2020-12-20
 */
@Service
public class ProductInfoPictureServiceImpl extends ServiceImpl<ProductInfoPictureMapper, ProductInfoPictureEntity> implements IProductInfoPictureService {

    @Override
    public List<ProductInfoPictureEntity> getInfoBySpuId(Integer spuId) {
        return baseMapper.selectList(new QueryWrapper<ProductInfoPictureEntity>().eq("deleted",false).eq("product_id",spuId));
    }
}
